package actiontiktokcasemyredis

type TripCases struct {
}

var TripCasesObject TripCases

const (
	// 旅途每日任务
	TripDayTaskNoticeRedis          = "day_task_notice"           //发弹幕
	TripDayTaskLikesRedis           = "day_task_likes"            //点赞
	TripDayTaskStarRedis            = "day_task_star"             //星光值
	TripDayTaskFairyWandRedis       = "day_task_fairy_wand"       //仙女棒
	TripDayTaskPillsRedis           = "day_task_pills"            //能力药丸
	TripDayTaskDoughnutsRedis       = "day_task_doughnuts"        //甜甜圈
	TripDayTaskBombRedis            = "day_task_bomb"             //爱的爆炸
	TripDayTaskMysteriousDropRedis  = "day_task_mysterious_drop"  //神秘空投
	TripDayTaskSuperSprayRedis      = "day_task_super_spray"      //超能喷射
	TripDayTaskEnergyCellRedis      = "day_task_energy_cell"      //能量电池
	TripDayTaskPartyMicrophoneRedis = "day_task_party_microphone" //派对话筒

	// 后台配置 每日任务Id 枚举
	TripDayTaskNoticeType          = 1  //发弹幕
	TripDayTaskLikesType           = 2  //点赞
	TripDayTaskStarType            = 3  //星光值
	TripDayTaskFairyWandType       = 4  //仙女棒
	TripDayTaskPillsType           = 5  //能力药丸
	TripDayTaskDoughnutsType       = 6  //甜甜圈
	TripDayTaskBombType            = 7  //爱的爆炸
	TripDayTaskMysteriousDropType  = 8  //神秘空投
	TripDayTaskSuperSprayType      = 9  //超能喷射
	TripDayTaskEnergyCellType      = 10 //能量电池
	TripDayTaskPartyMicrophoneType = 11 //派对话筒

	// 旅途点数来源 枚举

	TripDayTaskNoticeSource          = 1  //发弹幕
	TripDayTaskLikesSource           = 2  //点赞
	TripDayTaskStarSource            = 3  //星光值
	TripDayTaskFairyWandSource       = 4  //仙女棒
	TripDayTaskPillsSource           = 5  //能力药丸
	TripDayTaskDoughnutsSource       = 6  //甜甜圈
	TripDayTaskBombSource            = 7  //爱的爆炸
	TripDayTaskMysteriousDropSource  = 8  //神秘空投
	TripDayTaskSuperSpraySource      = 9  //超能喷射
	TripDayTaskEnergyCellSource      = 10 //能量电池
	TripDayTaskPartyMicrophoneSource = 11 //派对话筒

	TripOtherTaskPartyMicrophoneSource = 100 //其他任务：派对话筒

	// 旅途点数加减 枚举
	TripScoreChangeLogTypeAdd     = 1 //增加
	TripScoreChangeLogTypeReduced = 2 //减少

	// 旅途奖品发放来源
	TripPrizeFromLevelChangeSource = 1 //等级变化

	// 旅途活动上下架
	TripObserveIsNotUp = 0 // 未上架
	TripObserveIsUp    = 1 // 上架中
	TripObserveIsEnd   = 2 // 未上架

	// 旅途点数获取类型
	TripScoreGetTypeTask               = 0 // 旅途任务
	TripScoreGetTypeLottery            = 1 // 抽奖活动
	TripScoreGetTypePieceExchange      = 2 // 碎片兑换
	TripScoreGetTypeBuyShopMallGoodAdd = 3 // 购买商品
)

func (e TripCases) TripTaskType() []int {
	return []int{
		TripDayTaskNoticeType,
		TripDayTaskLikesType,
		TripDayTaskStarType,
		TripDayTaskFairyWandType,
		TripDayTaskPillsType,
		TripDayTaskDoughnutsType,
		TripDayTaskBombType,
		TripDayTaskMysteriousDropType,
		TripDayTaskSuperSprayType,
		TripDayTaskEnergyCellType,
		TripDayTaskPartyMicrophoneType,
	}
}

func (e TripCases) TripTaskSource() []int {
	return []int{
		TripDayTaskNoticeSource,
		TripDayTaskLikesSource,
		TripDayTaskStarSource,
		TripDayTaskFairyWandSource,
		TripDayTaskPillsSource,
		TripDayTaskDoughnutsSource,
		TripDayTaskBombSource,
		TripDayTaskMysteriousDropSource,
		TripDayTaskSuperSpraySource,
		TripDayTaskEnergyCellSource,
		TripDayTaskPartyMicrophoneSource,
		TripOtherTaskPartyMicrophoneSource,
	}
}

func (e TripCases) TripTaskMap() map[int]int {
	m := make(map[int]int)
	for _, s := range e.TripTaskType() {
		m[s] = s
	}
	return m
}

func (e TripCases) TripTaskNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.TripTaskType() {
		m[s] = e.TripTaskTypeString(s)
	}
	return m
}

func (e TripCases) TripTaskSourceNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.TripTaskSource() {
		m[s] = e.TripTaskSourceString(s)
	}
	return m
}

// 返回每个任务对应的redis key
func (e TripCases) TripTaskRedisKeyString(tag int) string {
	switch tag {

	case TripDayTaskNoticeType:
		return TripDayTaskNoticeRedis
	case TripDayTaskLikesType:
		return TripDayTaskLikesRedis
	case TripDayTaskStarType:
		return TripDayTaskStarRedis
	case TripDayTaskFairyWandType:
		return TripDayTaskFairyWandRedis
	case TripDayTaskPillsType:
		return TripDayTaskPillsRedis
	case TripDayTaskDoughnutsType:
		return TripDayTaskDoughnutsRedis
	case TripDayTaskBombType:
		return TripDayTaskBombRedis
	case TripDayTaskMysteriousDropType:
		return TripDayTaskMysteriousDropRedis
	case TripDayTaskSuperSprayType:
		return TripDayTaskSuperSprayRedis
	case TripDayTaskEnergyCellType:
		return TripDayTaskEnergyCellRedis
	case TripDayTaskPartyMicrophoneType:
		return TripDayTaskPartyMicrophoneRedis
	default:
		return ""
	}
}

func (e TripCases) TripTaskTypeString(tag int) string {
	switch tag {
	case TripDayTaskNoticeType:
		return "发弹幕获得"
	case TripDayTaskLikesType:
		return "点赞获得"
	case TripDayTaskStarType:
		return "星光值获得"
	case TripDayTaskFairyWandType:
		return "赠送仙女棒获得"
	case TripDayTaskPillsType:
		return "赠送能力药丸获得"
	case TripDayTaskDoughnutsType:
		return "赠送甜甜圈获得"
	case TripDayTaskBombType:
		return "赠送爱的爆炸获得"
	case TripDayTaskMysteriousDropType:
		return "赠送神秘空投获得"
	case TripDayTaskSuperSprayType:
		return "赠送超能喷射获得"
	case TripDayTaskEnergyCellType:
		return "赠送能量电池获得"
	case TripDayTaskPartyMicrophoneType:
		return "赠送派对话筒获得"
	default:
		return "未知"
	}
}

func (e TripCases) TripTaskSourceString(tag int) string {
	switch tag {
	case TripDayTaskNoticeSource:
		return "发弹幕获得"
	case TripDayTaskLikesSource:
		return "点赞获得"
	case TripDayTaskStarSource:
		return "星光值获得"
	case TripDayTaskFairyWandSource:
		return "赠送仙女棒获得"
	case TripDayTaskPillsSource:
		return "赠送能力药丸获得"
	case TripDayTaskDoughnutsSource:
		return "赠送甜甜圈获得"
	case TripDayTaskBombSource:
		return "赠送爱的爆炸获得"
	case TripDayTaskMysteriousDropSource:
		return "赠送神秘空投获得"
	case TripDayTaskSuperSpraySource:
		return "赠送超能喷射获得"
	case TripDayTaskEnergyCellSource:
		return "赠送能量电池获得"
	case TripDayTaskPartyMicrophoneSource:
		return "赠送派对话筒获得"
	case TripOtherTaskPartyMicrophoneSource:
		return "其他任务,赠送派对话筒获得"
	default:
		return "未知"
	}
}

func (e TripCases) TripPrizeSourceString(tag int) string {
	switch tag {
	case TripPrizeFromLevelChangeSource:
		return "等级变化"
	default:
		return "未知"
	}
}
